﻿using System.Collections.Generic;
using System.Windows.Forms;

namespace ProxyTool.Controls
{
    public class TreeNodeLevelIComparer : IComparer<TreeNode>
    {
        public int Compare(TreeNode x, TreeNode y)
        {
            if (x == null || y == null) return -1;
            if (x.Level > y.Level)
                return 1;
            if (x.Level < y.Level)
                return -1;
            return 0;
        }
    }
}